import * as fs from 'fs'
import * as yaml from 'js-yaml'
import * as path from 'path'

const YAML_CONFIG_FILENAME = '.env.development.yaml'

function parseEnv() {
  return yaml.load(
    fs.readFileSync(path.join(process.cwd(), YAML_CONFIG_FILENAME), 'utf8')
  ) as ENV_CONFIG
}

export default function () {
  return parseEnv()
}
